package pl.elka.simulator.core.mobilityManager.impl.nodes;

import java.util.HashSet;
import java.util.Set;

import pl.elka.simulator.core.Node;
import pl.elka.simulator.core.Position;
import pl.elka.simulator.core.Segment;
import pl.elka.simulator.core.mobilityManager.impl.SniffedSegments;

public class ExplorerNode extends Node {
	public boolean isSinffing = false;
	public int sniffingTime = 0;
	public Position sniffingDirection;
	public Segment sniffedSegment;
	public Position sniffedTarget;
	public Set<SniffedSegments> sniffedSegments = new HashSet<SniffedSegments>();
	public Position velocity = new Position();
	public ExplorerNode(Node n){
		super(n.position);
	}
	
	public void addSniffedSegment(Segment seg, Position direction){
		SniffedSegments ss = new SniffedSegments();
		ss.segment = seg;
		ss.direction = direction;
		sniffedSegments.add(ss);
	}
	public boolean contains(Segment seg, Position dir){
		SniffedSegments ss = new SniffedSegments();
		ss.segment = seg;
		ss.direction = dir;
		return sniffedSegments.contains(ss);
	}
		
}
